package com.ykt.controller;

import java.util.Date;

import com.jfinal.ext.route.ControllerBind;
import com.jfinal.token.TokenManager;
import com.ykt.model.Market;

@ControllerBind(controllerKey="/market")
public class MarketController extends BaseController<Market> {
	
	public MarketController() {
		super(Market.class);
	}
	
	/**
	 * 查找对应摄像头
	 */
	public void camera() {
		Long id = this.getParaToLong(0, 0L);
		if (id != 0L) {
            po = get(id);
        } else {
            setAttr("now", new Date());
        }
        TokenManager.createToken(this, tokenName, tokenTout);
        this.setAttr("po", po);
	}
}
